<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ include file="/sys/include/header.jsp" %>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<head>
<title>设置报销属性</title>
<style type="text/css">
body{
	margin:10px;  
	font-size:0.9em;
}
a{
	color:#F00;
}
.STYLE1 {color: #FF0000}
</style>
<!-- extjs -->
<link rel="stylesheet" type="text/css" href="sys/extjs/css/ext-all.css">
<script type="text/javascript" src="sys/extjs/js/ext-base.js"></script>
<script type="text/javascript" src="sys/extjs/js/ext-all.js"></script>
<link rel="stylesheet" type="text/css" href="sys/extjs/css/tables-example.css">	
<link href="sys/style01/css/table.css" rel="stylesheet" type="text/css" /> 
<link rel="stylesheet" href="sys/style01/css/tab-view.css" type="text/css" media="screen">
<link href="sys/style01/date/css/banzu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="sys/style01/date/include/js/calendar.js"></script>
<script type="text/javascript" src="sys/style01/date/include/js/checkdate.js"></script>
<script type="text/javascript" src="sys/style01/date/include/js/calendar-zh.js"></script>
<script type="text/javascript" src="sys/style01/date/include/js/calendar-setup.js"></script>
<script type="text/javascript" src="sys/js/include/common.js"></script>
</head>
<script type="text/javascript"> 
function save(){
	var baoxiao_day = document.form1.baoxiao_day.value;
	var shenpi_day = document.form1.shenpi_day.value;
	var chailv_yuzhi = document.form1.chailv_yuzhi.value;
	if(baoxiao_day == ''){
		alert("请输入报销申请截止日期！");
		return;
	}
	if(shenpi_day == ''){
		alert("请输入报销审批截止日期！");
		return;
	}
	if(chailv_yuzhi == ''){
		alert("请输入差旅费报销阈值！");
		return;
	}
	if(baoxiao_day.length < 2) baoxiao_day = "0" + baoxiao_day;
	if(shenpi_day.length < 2) shenpi_day = "0" + shenpi_day;
	if(baoxiao_day >= shenpi_day){
		alert("报销申请截止日期必须小于报销审批截止日期！");
		return;
	}
	if(!validate(chailv_yuzhi)){
		alert("差旅费报销阈值格式不正确！");
		return;
	}
	if(confirm("确定提交么？")){
		document.form1.submit();
	}
}

function set(){
	document.form1.baoxiao_day.value = document.form1.baoxiao_d.value;
	document.form1.shenpi_day.value = document.form1.shenpi_d.value;
	document.form1.chailv_yuzhi.value = document.form1.chailv_yuzhi_d.value;
}
</script>
<body class="ridgeBody">
<table align="center" width="100%"><tr><td align="center">
<form name="form1" method="post" action="hr/setBaoxiaoPropertyDo.action"  >
	<table class=datatable width="100%" cellpadding='0' cellspacing='0' border='1' bordercolordark='white' bordercolorlight='#BEBEBE'>
	 <input name="baoxiao_d" type="hidden" class="input" value="${baoxiao_day.commonValue}"/> 
	  <input name="shenpi_d" type="hidden" class="input" value="${shenpi_day.commonValue}"/> 
	   <input name="chailv_yuzhi_d" type="hidden" class="input" value="${chailv_yuzhi.commonValue}"/> 
	   
	   <input name="shenqing_id" type="hidden" class="input" value="${baoxiao_day.commonId}"/> 
	  <input name="shenpi_id" type="hidden" class="input" value="${shenpi_day.commonId}"/> 
	   <input name="chailv_yuzhi_id" type="hidden" class="input" value="${chailv_yuzhi.commonId}"/> 
	    <tr>
	        <td height="25" colspan="4" valign="top" class="dataTitle"><br>设置报销属性</td>
	    </tr>	  
	    <tr>   
        	<td height="22" with="25%" nowrap="nowrap" class="datatr1"><span class="STYLE1">*</span>报销申请截止日期(某月几号)：</td>
        	<td height="22" with="25%">
        		<select class="selectwidth" name="baoxiao_day" value = "${ baoxiao_day.commonValue}">
            		<option value="" selected>请选择</option>
            		<c:forEach items="${baxiao_day_list}" var="day">
					<option value="${day.commonCode}" <c:if test="${day.commonCode==baoxiao_day.commonValue}">selected</c:if>>${day.commonValue}</option>	
					</c:forEach>
            	</select>
            </td>
      </tr>
      <tr>     
      	<td height="22" with="25%" nowrap="nowrap" class="datatr1"><span class="STYLE1">*</span>报销审批截止日期(某月几号)：</td>
        	<td height="22" with="25%">
        		<select class="selectwidth" name="shenpi_day" value = "${ shenpi_day.commonValue}">
            		<option value="" selected>请选择</option>
            		<c:forEach items="${baxiao_day_list}" var="day">
					<option value="${day.commonCode}" <c:if test="${day.commonCode==shenpi_day.commonValue}">selected</c:if>>${day.commonValue}</option>	
					</c:forEach>
            	</select>
            </td>
      </tr> 
      <tr>
      	<TD height="22" valign="top" nowrap class="datatr1"><span class="STYLE1">*</span>差旅费报销阈值(元)：</TD>	
		<TD valign="top" nowrap > 
	      <input name="chailv_yuzhi" type="text" class="input" value="${chailv_yuzhi.commonValue}"/> 
	    </TD>
      </tr>
      <tr>
		<td height="25" colspan="4"  class="dataTitle">
		<input type="button" name="Submit" value="提交" onClick = "save()">
		&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" name="reset" value="重置" onClick = "set()">
		</td>
	</tr>
</table>
</form>
</table>
</body>
</html> 

